﻿#region Styx Namespaces
using Styx;
using Styx.CommonBot.Routines;
using Styx.WoWInternals;
#endregion

namespace GiwinMonk
{
    public partial class Monk : CombatRoutine
    {
        /// <summary>
        /// Medallion Trinket - Slot 1
        /// </summary>

        public bool IsCCd()
        {
            return (Helpers.Unit.HasAuraWithMechanic(StyxWoW.Me, WoWSpellMechanic.Asleep) ||
                    Helpers.Unit.HasAuraWithMechanic(StyxWoW.Me, WoWSpellMechanic.Horrified) ||
                    Helpers.Unit.HasAuraWithMechanic(StyxWoW.Me, WoWSpellMechanic.Fleeing) ||
                    Helpers.Unit.HasAuraWithMechanic(StyxWoW.Me, WoWSpellMechanic.Charmed) ||
                    Helpers.Unit.HasAuraWithMechanic(StyxWoW.Me, WoWSpellMechanic.Frozen) ||
                    Helpers.Unit.HasAuraWithMechanic(StyxWoW.Me, WoWSpellMechanic.Polymorphed) ||
                    Helpers.Unit.HasAuraWithMechanic(StyxWoW.Me, WoWSpellMechanic.Rooted) ||
                    Helpers.Unit.HasAuraWithMechanic(StyxWoW.Me, WoWSpellMechanic.Stunned) ||
                    Helpers.Unit.HasAuraWithMechanic(StyxWoW.Me, WoWSpellMechanic.Disoriented) ||
                    (Helpers.Unit.HasAuraWithMechanic(StyxWoW.Me, WoWSpellMechanic.Incapacitated) &&
                     !Helpers.Unit.HasAnyAura(StyxWoW.Me, "Sapped")));
        }
    }
}
